/* 管理员界面专用样式 */

/* 侧边栏样式 */
.admin-sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 15px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
    border-left-color: #3498db;
    transform: translateX(5px);
}

.admin-sidebar .nav-link.active {
    color: white;
    background-color: rgba(52, 152, 219, 0.2);
    border-left-color: #3498db;
}

.admin-sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.admin-sidebar .sidebar-brand {
    padding: 20px;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar .sidebar-brand:hover {
    color: #3498db;
    text-decoration: none;
}

/* 主内容区域 */
.admin-main {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 0;
}

.admin-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e9ecef;
}

.admin-content {
    padding: 30px;
}

/* 统计卡片样式 */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stats-card.primary::before {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.stats-card.success::before {
    background: linear-gradient(90deg, #27ae60, #229954);
}

.stats-card.warning::before {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.stats-card.danger::before {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.stats-card .stats-icon {
    font-size: 3rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

.stats-card.primary .stats-icon {
    color: #3498db;
}

.stats-card.success .stats-icon {
    color: #27ae60;
}

.stats-card.warning .stats-icon {
    color: #f39c12;
}

.stats-card.danger .stats-icon {
    color: #e74c3c;
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

.stats-card .stats-label {
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 500;
}

/* 图表容器样式 */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.chart-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* 数据表格样式 */
.admin-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.admin-table .table {
    margin: 0;
}

.admin-table .table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-table .table thead th {
    color: white;
    border: none;
    font-weight: 600;
    padding: 15px;
    text-align: center;
}

.admin-table .table tbody td {
    padding: 15px;
    vertical-align: middle;
    text-align: center;
    border-bottom: 1px solid #f8f9fa;
}

.admin-table .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.action-buttons .btn {
    padding: 5px 10px;
    font-size: 0.875rem;
    border-radius: 5px;
}

/* 搜索和筛选区域 */
.filter-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-section .row {
    align-items: end;
}

.filter-section .form-label {
    font-weight: 600;
    color: #495057;
}

/* 状态徽章样式 */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-rejected {
    background-color: #f5c6cb;
    color: #721c24;
}

/* 模态框增强样式 */
.admin-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.admin-modal .modal-title {
    font-weight: 600;
}

.admin-modal .modal-body {
    padding: 25px;
}

.admin-modal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 20px 25px;
}

/* 表单增强样式 */
.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.admin-form .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.admin-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.admin-form .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
}

/* 工具栏样式 */
.admin-toolbar {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-toolbar .toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-toolbar .toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 页面标题样式 */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* 面包屑导航 */
.admin-breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.admin-breadcrumb .breadcrumb-item {
    color: #7f8c8d;
}

.admin-breadcrumb .breadcrumb-item.active {
    color: #2c3e50;
    font-weight: 600;
}

.admin-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #bdc3c7;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 10px;
    color: #95a5a6;
}

.empty-state p {
    margin-bottom: 20px;
}

/* 加载状态 */
.admin-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    flex-direction: column;
}

.admin-loading .loading {
    width: 40px;
    height: 40px;
    border-width: 4px;
    margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -250px;
        width: 250px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .admin-sidebar.show {
        left: 0;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-toolbar .toolbar-left,
    .admin-toolbar .toolbar-right {
        justify-content: center;
    }
    
    .stats-card {
        margin-bottom: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .filter-section .row {
        align-items: stretch;
    }
    
    .filter-section .col-md-3,
    .filter-section .col-md-2 {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .stats-card .stats-number {
        font-size: 2rem;
    }
    
    .stats-card .stats-icon {
        font-size: 2.5rem;
    }
    
    .admin-table .table {
        font-size: 0.875rem;
    }
    
    .admin-table .table thead th,
    .admin-table .table tbody td {
        padding: 10px 5px;
    }
}

/* 侧边栏切换按钮 */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c3e50;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: inline-block;
    }
}

/* 遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebar-overlay.show {
        display: block;
    }
}

/* 动画效果 */
.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* 自定义滚动条 */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}